#ifndef __GP_GC1054_CALIBRATION_H__
#define __GP_GC1054_CALIBRATION_H__

#include "..\gp_LensDef.h"

static const short	g_ob[15] =
{
	0,			// obautoen
	0,			// ob_type
	0,			// obHOffset
	0,			// obVOffset
	
	1,			// obmanuen
	0,//16,			// maunob
	
	1,			// wboffseten
	0,			// wbo_r
	0,			// wbo_gr
	0,			// wbo_gb
	0,			// wbo_b
	
	0,			// badpixen
	160,		// bprthr
	160,		// bpgthr
	160,		// bpbthr
};

static const unsigned int	g_gamma[] =
{
#if 1 //3006
	0x199900, 0x15960b, 0x155615, 0x15561e, 0x155526, 0x11542e, 0x114534, 0x04543a,
	0x04513f, 0x111144, 0x144449, 0x11114d, 0x144452, 0x051156, 0x05145b, 0x011160,
	0x044464, 0x104468, 0x01116b, 0x10446f, 0x041172, 0x110476, 0x104479, 0x04417c,
	0x04417f, 0x044182, 0x104185, 0x104188, 0x01048b, 0x04108e, 0x010490, 0x101093,
	0x010495, 0x004197, 0x00409a, 0x10109c, 0x00409e, 0x0040a0, 0x0101a1, 0x1004a3,
	0x0040a5, 0x1001a6, 0x0100a8, 0x0010a9, 0x1001aa, 0x0400ac, 0x0100ad, 0x0040ae,
	0x0010af, 0x0010b0, 0x0010b1, 0x0040b2, 0x0040b3, 0x0100b4, 0x0400b5, 0x1000b6,
	0x0000b7, 0x0000b8, 0x0001b8, 0x0004b9, 0x0010ba, 0x0040bb, 0x0040bc, 0x0040bd,
	0x0040be, 0x0040bf, 0x0010c0, 0x0004c1, 0x1001c2, 0x0100c4, 0x0040c5, 0x0040c6,
	0x0040c7, 0x0040c8, 0x0040c9, 0x0100ca, 0x0100cb, 0x0100cc, 0x0400cd, 0x0400ce,
	0x0400cf, 0x0000d0, 0x0000d1, 0x0001d1, 0x0004d2, 0x0010d3, 0x0010d4, 0x0010d5,
	0x0010d6, 0x0010d7, 0x0010d8, 0x0004d9, 0x0004da, 0x0001db, 0x1000dd, 0x0400de,
	0x0100df, 0x0040e0, 0x0010e1, 0x0001e2, 0x1000e4, 0x0100e5, 0x0040e6, 0x0010e7,
	0x0004e8, 0x1000ea, 0x0400eb, 0x0040ec, 0x0010ed, 0x0004ee, 0x1001ef, 0x0400f1,
	0x0100f2, 0x0100f3, 0x0040f4, 0x0010f5, 0x0004f6, 0x0004f7, 0x0001f8, 0x0001f9,
	0x0001fa, 0x0001fb, 0x0004fc, 0x0010fd, 0x0040fe, 0x0000ff, 0x0000ff, 0x0000ff
#else
// 1248 with H22
	0x04510d, 0x051112, 0x111417, 0x14451b, 0x111120, 0x044425, 0x111129, 0x05112d,
	0x044432, 0x044436, 0x04443a, 0x04443e, 0x044442, 0x110446, 0x111149, 0x04444d,
	0x111051, 0x044154, 0x111058, 0x10445b, 0x04415e, 0x011062, 0x011065, 0x010468,
	0x01046b, 0x01046e, 0x041071, 0x041074, 0x104176, 0x010479, 0x04107c, 0x00417e,
	0x041081, 0x010183, 0x101086, 0x040488, 0x01018a, 0x10408d, 0x10108f, 0x041091,
	0x040493, 0x040495, 0x040497, 0x040499, 0x10109b, 0x00109d, 0x00409f, 0x0101a0,
	0x1004a2, 0x0010a4, 0x0100a6, 0x1004a7, 0x0040a9, 0x1001aa, 0x0040ac, 0x1001ad,
	0x0100af, 0x0004b0, 0x0400b2, 0x0040b3, 0x0004b4, 0x0400b6, 0x0100b7, 0x0010b8,
	0x0004b9, 0x1000bb, 0x0400bc, 0x0100bd, 0x0040be, 0x0010bf, 0x0004c0, 0x0004c1,
	0x0001c2, 0x0001c3, 0x0000c5, 0x0000c6, 0x0000c7, 0x0000c8, 0x0000c9, 0x0000ca,
	0x0000cb, 0x0000cc, 0x0000cd, 0x0000ce, 0x0000cf, 0x0000d0, 0x0001d0, 0x0001d1,
	0x0001d2, 0x0001d3, 0x0001d4, 0x0001d5, 0x0001d6, 0x0001d7, 0x0001d8, 0x0001d9,
	0x0000db, 0x0000dc, 0x1000dd, 0x0400de, 0x0400df, 0x0100e0, 0x0040e1, 0x0010e2,
	0x0004e3, 0x1000e5, 0x0100e6, 0x0040e7, 0x0004e8, 0x1000ea, 0x0100eb, 0x0004ec,
	0x0400ee, 0x0040ef, 0x1001f0, 0x0040f2, 0x1004f3, 0x0040f5, 0x0401f6, 0x0010f8,
	0x0100fa, 0x0404fb, 0x1010fd, 0x0000ff, 0x0000ff, 0x0000ff, 0x0000ff, 0x0000ff
#endif

};

static const unsigned int g_gamma2[] =
{
// 1248 with H22
0x04510d, 0x051112, 0x111417, 0x14451b, 0x111120, 0x044425, 0x111129, 0x05112d,
0x044432, 0x044436, 0x04443a, 0x04443e, 0x044442, 0x110446, 0x111149, 0x04444d,
0x111051, 0x044154, 0x111058, 0x10445b, 0x04415e, 0x011062, 0x011065, 0x010468,
0x01046b, 0x01046e, 0x041071, 0x041074, 0x104176, 0x010479, 0x04107c, 0x00417e,
0x041081, 0x010183, 0x101086, 0x040488, 0x01018a, 0x10408d, 0x10108f, 0x041091,
0x040493, 0x040495, 0x040497, 0x040499, 0x10109b, 0x00109d, 0x00409f, 0x0101a0,
0x1004a2, 0x0010a4, 0x0100a6, 0x1004a7, 0x0040a9, 0x1001aa, 0x0040ac, 0x1001ad,
0x0100af, 0x0004b0, 0x0400b2, 0x0040b3, 0x0004b4, 0x0400b6, 0x0100b7, 0x0010b8,
0x0004b9, 0x1000bb, 0x0400bc, 0x0100bd, 0x0040be, 0x0010bf, 0x0004c0, 0x0004c1,
0x0001c2, 0x0001c3, 0x0000c5, 0x0000c6, 0x0000c7, 0x0000c8, 0x0000c9, 0x0000ca,
0x0000cb, 0x0000cc, 0x0000cd, 0x0000ce, 0x0000cf, 0x0000d0, 0x0001d0, 0x0001d1,
0x0001d2, 0x0001d3, 0x0001d4, 0x0001d5, 0x0001d6, 0x0001d7, 0x0001d8, 0x0001d9,
0x0000db, 0x0000dc, 0x1000dd, 0x0400de, 0x0400df, 0x0100e0, 0x0040e1, 0x0010e2,
0x0004e3, 0x1000e5, 0x0100e6, 0x0040e7, 0x0004e8, 0x1000ea, 0x0100eb, 0x0004ec,
0x0400ee, 0x0040ef, 0x1001f0, 0x0040f2, 0x1004f3, 0x0040f5, 0x0401f6, 0x0010f8,
0x0100fa, 0x0404fb, 0x1010fd, 0x0000ff, 0x0000ff, 0x0000ff, 0x0000ff, 0x0000ff
};

static const unsigned short g_wb_gain[71][2] =
{				/*2000K~8000K*/
	{64 ,177},
	{64 ,175},
	{64 ,173},
	{64 ,172},
	{64 ,170},
	{65 ,169},
	{66 ,167},
	{68 ,165},
	{70 ,164},
	{72 ,162},
	{73 ,160},
	{75 ,159},
	{76 ,157},
	{78 ,155},
	{80 ,154},
	{81 ,152},
	{83 ,150},
	{84 ,149},
	{86 ,147},
	{87 ,145},
	{88 ,143},
	{90 ,142},//40
	{91 ,140},
	{93 ,138},
	{94 ,137},
	{95 ,135},
	{97 ,133},
	{98 ,131},
	{99 ,130},
	{100,128},
	{102,126},
	{103,124},//50
	{104,123},
	{105,121},
	{106,119},
	{107,117},
	{108,115},
	{109,114},
	{111,112},
	{112,110},
	{113,108},
	{114,106},//60
	{114,105},
	{115,103},
	{116,101},
	{117,99 },
	{118,97 },
	{119,96 },
	{120,94 },
	{121,92 },
	{121,90 },
	{122,88 },//70
	{123,86 },
	{124,84 },
	{124,83 },
	{125,81 },
	{126,79 },
	{126,77 },
	{127,75 },
	{127,73 },
	{128,71 },//80   
	{128,69 },
	{129,67 },
	{130,66 },
	{130,64 },
	{130,64 },
	{131,64 },
	{131,64 },
	{132,64 },
	{132,64 },
	{132,64 }	
};

static const short	g_awb_thr[37] =
{//180522
	200,		// awbwinthr
	
	0 * 64,		// sindata
	1 * 64,		// cosdata
	
	20,			// Ythr0
	60,			// Ythr1
	120,		// Ythr2
	180,		// Ythr3

	// wb thr
	-8,//UL1N1
	8,//UL1P1
	-5,//VL1N1
	5,//UL1P1
	-12,//UL1N2
	12,//UL1P2
	-10,//VL1N2
	10,//UL1P2
	-19,//UL1N3
	19,//UL1P3
	-15,//VL1N3
	15,//UL1P3

	// without wb thr
	-22,//UL1N1
	-9,//UL1P1
	-18,//VL1N1
	1,//UL1P1
	-39,//UL1N2
	-15,//UL1P2
	-31,//VL1N2
	1,//UL1P2
	-72,//UL1N3
	-33,//UL1P3
	-57,//VL1N3
	2,//UL1P3
	
	//initial r/b gain
	117, //r gain
	108,  //b gain 	

	//GdivB& GdivR
	0,			//awb_win.gdbthr1
	16383,	//awb_win.gdbthr2
	0,			//awb_win.gdrthr1
	16383	//awb_win.gdrthr2
};


static const short	g_color_matrix[9] =
{ 
/*
(short) (1.50946150311416515954   * 64),  //1.0
(short) (-0.43734042466737899080  * 64),  
(short) (-0.07212107844678629365  * 64),  
(short) (-0.41674896131679156630  * 64),  
(short) (1.77912741360025372650   * 64),  
(short) (-0.36237845228346232673  * 64),  
(short) (-0.04243766616380872242  * 64),  
(short) (-0.86146791261842758924  * 64),  
(short) (1.90390557878223631860   * 64)   
*/

(short) (1.41100123273754296527   * 64),  //0.8
(short) (-0.38046094872856567326  * 64),       
(short) (-0.03054028400897715670  * 64),       
(short) (-0.41564314399892815510  * 64),       
(short) (1.77870309047728336616   * 64),       
(short) (-0.36305994647835510003  * 64),       
(short) (-0.00439010244705906327  * 64),       
(short) (-0.91345661754614460026  * 64),       
(short) (1.91784671999320366353   * 64)        


};

const INT8U LiTable_rgb[48] =
{
	0x1e, 0x2e, 0x3e, 0x4e, 0x5e, 0x6e, 0x7e, 0x8e, 0x9e, 0xae, 0xbe, 0xce,
	0xde, 0xee, 0xfe, 0xff, 0x0f, 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f,
	0x8f, 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x07, 0x17, 0x27, 0x37, 
	0x47, 0x57, 0x67, 0x77, 0x87, 0x97, 0xa7, 0xb7, 0xc7, 0xd7, 0xe7, 0xf7
};

const INT16U MaxTan8[32] =
{
	0x0C0, 0x155, 0x154, 0x0C1, 0x0BF, 0x156, 0x153, 0x0C2, 0x0BF, 0x154, 0x153, 
	0x0C0, 0x0BE, 0x155, 0x152, 0x0C1, 0x0BE, 0x153, 0x152, 0x0BF, 0x0BD, 0x154, 
	0x151, 0x0C0, 0x0BD, 0x152, 0x151, 0x0BE, 0x0BC, 0x153, 0x150, 0x0BF
};

const INT16U Slope4[16] =
{ 
	0x155, 0x154, 0x153, 0x152, 0x151, 0x152, 0x153, 0x154,
	0x155, 0x154, 0x153, 0x152, 0x151, 0x152, 0x153, 0x154 
};

const INT16U CLPoint[8] =	
{
	0x400,0x300,0x400,0x300,0x400,0x300,0x400,0x300
};

const INT16U Radius_File_0[512] =
{
	0x100, 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x102, 0x103, 0x104, 
	0x105, 0x106, 0x107, 0x108, 0x109, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, 
	0x10a, 0x10b, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x108, 
	0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x10a, 0x10b, 0x10c, 0x10d, 
	0x10e, 0x10f, 0x110, 0x111, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, 
	0x113, 0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 0x114, 0x115, 0x110, 0x111, 
	0x112, 0x113, 0x114, 0x115, 0x116, 0x117, 0x112, 0x113, 0x114, 0x115, 0x116, 
	0x117, 0x118, 0x119, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 
	0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x118, 0x119, 0x11a, 
	0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 
	0x120, 0x121, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 0x123, 0x11e, 
	0x11f, 0x120, 0x121, 0x122, 0x123, 0x124, 0x125, 0x102, 0x103, 0x104, 0x105, 
	0x106, 0x107, 0x108, 0x109, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 
	0x10b, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x108, 0x109, 
	0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 
	0x10f, 0x110, 0x111, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 
	0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 0x114, 0x115, 0x110, 0x111, 0x112, 
	0x113, 0x114, 0x115, 0x116, 0x117, 0x112, 0x113, 0x114, 0x115, 0x116, 0x117, 
	0x118, 0x119, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x116, 
	0x117, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x118, 0x119, 0x11a, 0x11b, 
	0x11c, 0x11d, 0x11e, 0x11f, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 
	0x121, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 0x123, 0x11e, 0x11f, 
	0x120, 0x121, 0x122, 0x123, 0x124, 0x125, 0x120, 0x121, 0x122, 0x123, 0x124, 
	0x125, 0x126, 0x127, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 
	0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x108, 0x109, 0x10a, 
	0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 
	0x110, 0x111, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 0x10e, 
	0x10f, 0x110, 0x111, 0x112, 0x113, 0x114, 0x115, 0x110, 0x111, 0x112, 0x113, 
	0x114, 0x115, 0x116, 0x117, 0x112, 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 
	0x119, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x116, 0x117, 
	0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 
	0x11d, 0x11e, 0x11f, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 
	0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 0x123, 0x11e, 0x11f, 0x120, 
	0x121, 0x122, 0x123, 0x124, 0x125, 0x120, 0x121, 0x122, 0x123, 0x124, 0x125, 
	0x126, 0x127, 0x122, 0x123, 0x124, 0x125, 0x126, 0x127, 0x128, 0x129, 0x106, 
	0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x108, 0x109, 0x10a, 0x10b, 
	0x10c, 0x10d, 0x10e, 0x10f, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 
	0x111, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 0x10e, 0x10f, 
	0x110, 0x111, 0x112, 0x113, 0x114, 0x115, 0x110, 0x111, 0x112, 0x113, 0x114, 
	0x115, 0x116, 0x117, 0x112, 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 
	0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x116, 0x117, 0x118, 
	0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 
	0x11e, 0x11f, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x11c, 
	0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 0x123, 0x11e, 0x11f, 0x120, 0x121, 
	0x122, 0x123, 0x124, 0x125, 0x120, 0x121, 0x122, 0x123, 0x124, 0x125, 0x126, 
	0x127, 0x122, 0x123, 0x124, 0x125, 0x126, 0x127, 0x128, 0x129, 0x124, 0x125, 
	0x126, 0x127, 0x128, 0x129, 0x12a, 0x12b
};

const INT16U Radius_File_1[512] =
{
	0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x103, 0x104, 0x105, 
	0x106, 0x107, 0x108, 0x109, 0x10a, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 
	0x10b, 0x10c, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x109, 
	0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x10b, 0x10c, 0x10d, 0x10e, 
	0x10f, 0x110, 0x111, 0x112, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 
	0x114, 0x10f, 0x110, 0x111, 0x112, 0x113, 0x114, 0x115, 0x116, 0x111, 0x112, 
	0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x113, 0x114, 0x115, 0x116, 0x117, 
	0x118, 0x119, 0x11a, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 
	0x117, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x119, 0x11a, 0x11b, 
	0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 
	0x121, 0x122, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 0x123, 0x124, 0x11f, 
	0x120, 0x121, 0x122, 0x123, 0x124, 0x125, 0x126, 0x103, 0x104, 0x105, 0x106, 
	0x107, 0x108, 0x109, 0x10a, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 
	0x10c, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x109, 0x10a, 
	0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 
	0x110, 0x111, 0x112, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 0x114, 
	0x10f, 0x110, 0x111, 0x112, 0x113, 0x114, 0x115, 0x116, 0x111, 0x112, 0x113, 
	0x114, 0x115, 0x116, 0x117, 0x118, 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 
	0x119, 0x11a, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x117, 
	0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x119, 0x11a, 0x11b, 0x11c, 
	0x11d, 0x11e, 0x11f, 0x120, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 
	0x122, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 0x123, 0x124, 0x11f, 0x120, 
	0x121, 0x122, 0x123, 0x124, 0x125, 0x126, 0x121, 0x122, 0x123, 0x124, 0x125, 
	0x126, 0x127, 0x128, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 
	0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x109, 0x10a, 0x10b, 
	0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 
	0x111, 0x112, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 0x114, 0x10f, 
	0x110, 0x111, 0x112, 0x113, 0x114, 0x115, 0x116, 0x111, 0x112, 0x113, 0x114, 
	0x115, 0x116, 0x117, 0x118, 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 
	0x11a, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x117, 0x118, 
	0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 
	0x11e, 0x11f, 0x120, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 
	0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 0x123, 0x124, 0x11f, 0x120, 0x121, 
	0x122, 0x123, 0x124, 0x125, 0x126, 0x121, 0x122, 0x123, 0x124, 0x125, 0x126, 
	0x127, 0x128, 0x123, 0x124, 0x125, 0x126, 0x127, 0x128, 0x129, 0x12a, 0x107, 
	0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x109, 0x10a, 0x10b, 0x10c, 
	0x10d, 0x10e, 0x10f, 0x110, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 
	0x112, 0x10d, 0x10e, 0x10f, 0x110, 0x111, 0x112, 0x113, 0x114, 0x10f, 0x110, 
	0x111, 0x112, 0x113, 0x114, 0x115, 0x116, 0x111, 0x112, 0x113, 0x114, 0x115, 
	0x116, 0x117, 0x118, 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 
	0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x117, 0x118, 0x119, 
	0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 
	0x11f, 0x120, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x120, 0x121, 0x122, 0x11d, 
	0x11e, 0x11f, 0x120, 0x121, 0x122, 0x123, 0x124, 0x11f, 0x120, 0x121, 0x122, 
	0x123, 0x124, 0x125, 0x126, 0x121, 0x122, 0x123, 0x124, 0x125, 0x126, 0x127, 
	0x128, 0x123, 0x124, 0x125, 0x126, 0x127, 0x128, 0x129, 0x12a, 0x125, 0x126, 
	0x127, 0x128, 0x129, 0x12a, 0x12b, 0x12c
};

INT16S g_awb_new_thr[13*7] = 
{ 
//2700

30,
200,
157,
176,
82,
101,
123,
135,
35,
39,
33,
43,
2,


//3800

30,
200,
131,
148,
29,
49,
84,
95,
46,
53,
30,
39,
2,


//4800

30,
200,
136,
148,
7,
24,
76,
82,
60,
65,
36,
42,
2,


//6000

30,
200,
139,
155,
-14,
3,
66,
74,
71,
80,
37,
46,
2,


30,
200,
144,
156,
-9,
4,
71,
77,
72,
79,
40,
47,
2,


30,
200,
128,
151,
1,
24,
70,
82,
57,
68,
31,
43,
2,


30,
200,
123,
145,
-13,
12,
61,
73,
61,
72,
29,
41,
2,
};


const ALIGN4 INT32U g_Y_lut[64] =
{

 0x01010100, 0x03020202, 0x04040303, 0x06050504, 0x07070606, 0x09090808, 0x0c0b0a0a, 0x0e0e0d0c,
 0x1211100f, 0x16141313, 0x1a191817, 0x1f1e1c1b, 0x23222120, 0x29282625, 0x2e2d2c2a, 0x34323130,
 0x3a383735, 0x403e3d3b, 0x45444341, 0x4b494846, 0x514f4e4d, 0x57555452, 0x5d5b5a58, 0x6362605e,
 0x6a686765, 0x716f6d6c, 0x78767573, 0x7f7e7c7a, 0x86848281, 0x8d8b8988, 0x9392908f, 0x9a989695,
 0xa09e9d9b, 0xa5a4a3a1, 0xabaaa8a7, 0xb1afaead, 0xb6b4b3b2, 0xbab9b8b7, 0xbebdbcbb, 0xc2c1c0bf,
 0xc6c5c4c3, 0xc9c8c8c7, 0xcccccbca, 0xcfcfcecd, 0xd2d2d1d0, 0xd5d5d4d3, 0xd8d7d7d6, 0xdadad9d9,
 0xdddcdcdb, 0xe0dfdede, 0xe2e1e1e0, 0xe4e4e3e3, 0xe6e6e5e5, 0xe9e8e8e7, 0xebebeae9, 0xededecec,
 0xf0efeeee, 0xf2f1f1f0, 0xf4f3f3f2, 0xf6f5f5f4, 0xf8f7f7f6, 0xfafaf9f9, 0xfdfcfbfb, 0xfffefefd,
};


const ALIGN4 INT32U g_Y_lut2[64] =
{
 0x02010100, 0x04030302, 0x07060605, 0x09080807, 0x0c0b0a0a, 0x0f0e0d0d, 0x1110100f, 0x14131312,
 0x18171615, 0x1a191918, 0x1d1d1c1b, 0x201f1f1e, 0x24232221, 0x27272625, 0x2b2a2928, 0x2f2e2d2c,
 0x33323130, 0x37363534, 0x3b3a3938, 0x403f3d3c, 0x44434241, 0x49474645, 0x4e4c4b4a, 0x5351504f,
 0x57565554, 0x5c5b5a58, 0x61605e5d, 0x66646362, 0x6b6a6867, 0x6f6e6d6c, 0x74737271, 0x78777675,
 0x7e7c7b7a, 0x8281807f, 0x87858483, 0x8b8a8988, 0x908f8e8c, 0x94939291, 0x98979695, 0x9d9b9a99,
 0xa1a09f9e, 0xa5a4a3a2, 0xa9a8a7a6, 0xadacabaa, 0xb2b0afae, 0xb5b4b3b3, 0xbab9b8b7, 0xbdbcbcbb,
 0xc1c0bfbe, 0xc6c5c4c2, 0xc9c8c7c7, 0xcdcccbca, 0xd1d0cfce, 0xd5d4d3d2, 0xd9d8d7d6, 0xdddcdbda,
 0xe1e0dfde, 0xe6e5e3e2, 0xeae9e8e7, 0xeeedeceb, 0xf2f1f0ef, 0xf6f5f4f3, 0xfbf9f8f7, 0xfffefdfc, 
};


const ALIGN4 INT32U g_Y_identity[64] =
{
 0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c, 0x13121110, 0x17161514, 0x1b1a1918, 0x1f1e1d1c, 
 0x23222120, 0x27262524, 0x2b2a2928, 0x2f2e2d2c, 0x33323130, 0x37363534, 0x3b3a3938, 0x3f3e3d3c, 
 0x43424140, 0x47464544, 0x4b4a4948, 0x4f4e4d4c, 0x53525150, 0x57565554, 0x5b5a5958, 0x5f5e5d5c, 
 0x63626160, 0x67666564, 0x6b6a6968, 0x6f6e6d6c, 0x73727170, 0x77767574, 0x7b7a7978, 0x7f7e7d7c, 
 0x83828180, 0x87868584, 0x8b8a8988, 0x8f8e8d8c, 0x93929190, 0x97969594, 0x9b9a9998, 0x9f9e9d9c, 
 0xa3a2a1a0, 0xa7a6a5a4, 0xabaaa9a8, 0xafaeadac, 0xb3b2b1b0, 0xb7b6b5b4, 0xbbbab9b8, 0xbfbebdbc, 
 0xc3c2c1c0, 0xc7c6c5c4, 0xcbcac9c8, 0xcfcecdcc, 0xd3d2d1d0, 0xd7d6d5d4, 0xdbdad9d8, 0xdfdedddc, 
 0xe3e2e1e0, 0xe7e6e5e4, 0xebeae9e8, 0xefeeedec, 0xf3f2f1f0, 0xf7f6f5f4, 0xfbfaf9f8, 0xfffefdfc, 
};


const ALIGN4 INT16U NRthr[6][7] = 
{
    {1, 2, 3, 1, 2, 3, 4},
    {1, 2, 3, 3, 6, 9, 12},
    {1, 2, 3, 4, 7, 10, 14},
    {1, 2, 3, 4, 8, 12, 16},
    {1, 2, 3, 4, 8, 16, 32},
    {1, 2, 3, 5, 10, 20, 32} 
};

const ALIGN4 INT16U DPCthr[6][4] = 
{
    {0, 20, 35, 4},
    {0, 22, 30, 4},
    {0, 24, 28, 4},
    {0, 26, 25, 4},
    {0, 28, 23, 3},
    {0, 30, 20, 3}

};

const gpCisCali_t g_cali =
{
	(INT16U *)g_ob,
	(INT16U *) Radius_File_0,
	(INT16U *) Radius_File_1,
	(INT16U *) CLPoint,
	(INT16U *) MaxTan8,
	(INT16U *) Slope4,
	20,			
	(INT32U *) g_gamma,
	(INT32U *) g_gamma2, //X
	(INT16S *) g_awb_thr,
	//(INT16U(*)[2]) g_wb_gain,
	(INT16S *) g_color_matrix,
	(INT16S *) g_awb_new_thr,
	sizeof(g_awb_new_thr)/2/13,

	0,			/*Ae weight*/

	/*YUV Spec Constrat*/
	(INT32U *) g_Y_lut,
	(INT32U *) g_Y_lut2,
	
	(INT16U (*)[7]) NRthr,
	(INT16U (*)[4]) DPCthr,
};

#endif
